<?php
	
	include("verif_session.php");
	include("bdd_connection.php");
	include_once('config.php');
	include_once('ConnectBD.php');
	require_once("dao/materielCommandeDao.php");
    require_once("dao/nomadeDao.php");
    include_once('Connect_pdo.php');
	
	extract($_GET);
	extract($_POST);
	
	$materielcommande=new materielCommandeBean();
	$materielcommandeDao=new materielCommandeDao();
	$nomadeDao=new nomadeDao();

	
	if(isset($id_sup))
	{
	   $materielcommande->setId($id_sup);
	   $materielcommandeDao->supprimerMaterielCommande($materielcommande);
	   $message="Suppression effectueé avec succès!";
	   $smarty->assign("message",$message);
	}
		
 
 				$listmaterielcommande=$materielcommandeDao->loadAllMaterielCommande();
                $smarty->assign("nomadeDao",$nomadeDao);
				$smarty->assign("listmaterielcommande",$listmaterielcommande);
				$smarty->display("materielcommande.html");
			
	
?>
	